package org.millioncall.yueyoga.admin.model;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lisj 
 * Mar 25, 2014 11:17:35 AM
 */
public class Goods implements Serializable {

	private static final long serialVersionUID = -8687725390658202762L;

	private Integer id;
	private String code;
	private String name;
	private Integer type;
	private Integer counts;
	private Integer status;
	private Date createtime;
	private Double price;
	private String remarks;
	private GoodType goodType;
	private String organizationId;
	private String statusName;

	public String getStatusName() {
		if(this.status == 0){
			this.statusName = "上架";
		}else if(this.status == 1){
			this.statusName = "下架";
		}
		return this.statusName;
	}

	public Goods() {
	}

	public String getOrganizationId() {
		return organizationId == null?"":organizationId;
	}

	public void setOrganizationId(String organizationId) {
		this.organizationId = organizationId;
	}
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return code == null?"":code;
	}

	public void setCode(String code) {
		this.code = code == null ? null : code.trim();
	}

	public String getName() {
		return name == null?"":name;
	}

	public void setName(String name) {
		this.name = name == null ? null : name.trim();
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getCounts() {
		return counts;
	}

	public void setCounts(Integer counts) {
		this.counts = counts;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreatetime() {
		return createtime == null?new Date():createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public GoodType getGoodType() {
		return goodType;
	}

	public void setGoodType(GoodType goodType) {
		this.goodType = goodType;
	}

	public String getRemarks() {
		return remarks == null?"":remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
}